package com.yidu.ReportManagement.service.impl;

import com.yidu.DatelessManagement.entity.NetWorth;
import com.yidu.ReportManagement.entity.FundPortfolioTable;
import com.yidu.ReportManagement.mapper.FundPortfolioTableMapper;
import com.yidu.ReportManagement.service.FundPortfolioTableService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author 任俊杰
 * @version 1.0
 * @date 2023/2/10
 */
@Service
public class FundPortfolioTableServiceImpl implements FundPortfolioTableService {
    @Resource
    FundPortfolioTableMapper fundPortfolioTableMapper;

    /**
     * 证券板块查询方法
     * @param Date 时间
     * @param fundId 基金id
     * @param DateTwo 行情时间
     * @return
     */
    @Override
    public List<FundPortfolioTable> selectFundPortfolioTable(String Date, String fundId, String DateTwo) {
        return fundPortfolioTableMapper.selectFundPortfolioTable(Date,fundId,DateTwo);
    }

    /**
     * 资产净值查询方法
     * @param Date 时间
     * @param fundId 基金id
     * @return
     */
    @Override
    public NetWorth selectValue(String Date, String fundId) {
        return fundPortfolioTableMapper.selectValue(Date,fundId);
    }
}
